
const Controller = require('egg').Controller

class ProductImageController extends Controller {

  async index() {
    const { ctx } = this
    let id = JSON.parse(ctx.query[0]) 
    console.log(typeof(id) );
    let res = await ctx.service.productImage.getproductImage(id)
    if(res) {
      ctx.body = {
        code: 20000,
        data: res
      }
    }else{
      ctx.body = {
        code: 50000,
        data: '服务器异常'
      }
    }
  }

}

module.exports = ProductImageController